﻿using System.Windows.Controls;
using MMK.Paket_Tracker.GUI.ViewModels;
using MMK.Paket_Tracker.Runtime.Interfaces;
using System.Collections.Generic;
using System;

namespace MMK.Paket_Tracker.GUI.Views
{
    /// <summary>
    /// Interaction logic for GetStatus.xaml
    /// </summary>
    public partial class GetStatus : UserControl, INamedUserControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetStatus"/> class.
        /// </summary>
        public GetStatus()
        {
            InitializeComponent();
            Status.EntryBox.IsReadOnly = true;
            this.PaketId.EntryBox.CharacterCasing = CharacterCasing.Upper;
            //this.PaketId.EntryBox.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(EntryBox_PreviewKeyDown);
            
            viewModel = new GetStatusViewModel(this);
            this.DataContext = viewModel.Data;
        }

        //void EntryBox_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
        //{

        //}

        /// <summary>
        /// Gets the name of the view.
        /// </summary>
        /// <value>The name of the view.</value>
        public string ViewName
        {
            get { return "Abfrage Paketstatus"; }
        }

        /// <summary>
        /// Sets the error info.
        /// </summary>
        /// <value>
        /// The error info.
        /// </value>
        public Dictionary<String, String> ErrorInfo
        {
            set { this.button1.ToolTip = value.ToString(); }
        }


        private GetStatusViewModel viewModel;
    }
}
